package com.learn.english.model.param;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;

/**
 * @author TISNIW
 * @version 1.0
 * @date 2025/6/13 23:18
 * @desc
 */
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OllamaModels {
    private String name; // 模型名称
    private String model; // 模型标识
    @JsonProperty("modified_at")
    private String modifiedAt; // 最后修改时间
    private long size; // 模型大小（字节）
    private String digest; // 模型的哈希值，用于验证完整性
    private Details details; // 包含模型详细信息的对象

    @Override
    public String toString() {
        return "OllamaModels{" +
                '\t' + "name:" + name + ',' + '\n' +
                '\t' + "model:" + model + ',' + '\n' +
                '\t' + "modified_at:" + modifiedAt + ',' + '\n' +
                '\t' + "size=" + size + ',' + '\n' +
                '\t' + "digest:" + digest + ',' + '\n' +
                '\t' + "details={" +
                '\t' + '\t' + "parent_model:" + details.getParentModel() + ',' + '\n' +
                '\t' + '\t' + "format:" + details.getFormat() + ',' + '\n' +
                '\t' + '\t' + "family:" + details.getFamily() + ',' + '\n' +
                '\t' + '\t' + "families=" + details.getFamilies() +',' + '\n' +
                '\t' + '\t' + "parameter_size:" + details.getParameterSize() + ',' + '\n' +
                '\t' + '\t' + "quantization_level:" + details.getQuantizationLevel() + ',' + '\n' +
                '\t' + "}" +'\n' +
                '}';
    }
}
